//
// Created by yaozi on 2019/11/11.
//
#ifndef BTREE_HUFFMANCODE_H

#include <sstream>
#include "HuffmanCode.h"
#include "Implease.h"

#define BTREE_HUFFMANCODE_H
#endif

void HuffmanCode::printCode() {
    cout << "\t" << this->codeChar << "\t";
    cout << getCode() << "\n";
}

string HuffmanCode::getCode() {
    string codeString;
    for (int i = 0; i < length; ++i) {
        codeString += intToString(code[i]);
    }
    return codeString;
}
